home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PBLIB1 / UNITS / PBMISC.PAS < prev    next >
Pascal/Delphi Source File  |  1994-05-04  |  22KB  |  575 lines

  1. {SECTION ..PbMISC }
  2. UNIT PbMISC;
  3.  
  4. INTERFACE
  5.  
  6. Uses  DOS;
  7.  
  8. {
  9. Description:  Miscellaneous routines useable by most other units
  10.  
  11.               * TRY FOR NO OTHER DEPENDENCIES *
  12.  
  13. Author      : Howard Richoux
  14. Date        : 8/1/90
  15. Last revised: 2/17/94 MASSIVE COMBO
  16.               2/17/94 Combined PTIMstuf and PARSstuf and made DLL compatible
  17.               2/17/74 added MyFile and the DEF BP logic and TEXTSEEK
  18.               4/30/94 some cleaning up
  19. Application : IBM PC and compatibles, done using Turbo Pascal 7
  20. Status      : Placed in the Public Domain by HNR Software 1/29/94
  21. Published in: none
  22. }
  23.  
  24.  
  25. const fREADONLY             =  0;   { File open modes }
  26. const fWRITEONLY            =  1;
  27. const fREADWRITE            =  2;
  28. const fOPENSHARE            =  64;  {1/28/94 - when share is present }
  29. const fCREATE               = -1;
  30.  
  31. const fNoSort               = 0;
  32. const fSortbyName           = 1;
  33. const fSortbyExt            = 2;
  34.  
  35. const tenthousand : longint = 10000;
  36. const onehundred  : longint = 100;
  37.  
  38.  
  39.  
  40. type  termchars             =  set of char;
  41.  
  42. type  PTime                 =  Longint;         { type defined here, used in DOS as longint}
  43. type  Julian                =  real;            {~DateStuf }
  44.  
  45. type  DateRec =  record           {~DateStuf }
  46.              month, day, year : integer;
  47.              end;
  48.  
  49.  
  50. var  quotechar         : char;     { typically single or double quotes }
  51.      commenteolchar    : char;     { typically exclamation point }
  52.      commentpairLchar  : char;     { typically left squiggley bracket }
  53.      commentpairRchar  : char;     { typically right squiggley bracket }
  54.      qstringtoken      : char;     { char to use for tokenizing a string }
  55. var  multilinecomment  : boolean;  { true while mismatched comment brackets}
  56.  
  57.  
  58.  
  59. TYPE  FSCAN_ProcType        = Procedure (VAR S : SearchRec; P : PathStr);
  60. TYPE  FSCAN_FullNameStr     = STRING[12];
  61. TYPE  FSCAN_ProcessLineProc = procedure(s : string);
  62.  
  63.  
  64.  
  65.  
  66. Function  AddBackSlash(s1 : string) : string;
  67.                         {[FILE] puts '\' on if needed}
  68.  
  69. Function  BooleanStr( B : boolean ) : string; 
  70.                         {[STRING] formats boolean  "YES"/"NO"}
  71.  
  72. Function  BreakLineChr(var s : string; bklen : integer; ch : char) : string; 
  73.                         {[STRING] splits string at nearest "ch" back}
  74.  
  75. Function  BreakLine(var s : string; bklen : integer) : string; 
  76.                         {[STRING] splits string at nearest blank or comma back}
  77.  
  78. Function  ByteToHex( B : byte) : string; 
  79.                         {[STRING] 1 byte conversion to hex  00-FF}
  80.  
  81. Function  Buf16ToHexStr(addr : longint; count : integer; var xbuf; flag : boolean) : string; 
  82.                         {[STRING] One line of the DUMP output ( 1 <= count <= 16}
  83.  
  84. Function  CenterStr(s : string; w : byte) : string; 
  85.                         {[STRING] TUGstuf}
  86.  
  87. Procedure CleanUpBlanks(var s : string); 
  88.                         {[STRING] Gets rid of excess blanks}
  89.  
  90. Procedure CleanUpComments(var s : string); 
  91.                         {[STRING] Removes bracketed comments}
  92.  
  93. Procedure CleanUpString(var s : string); 
  94.                         {[STRING] Gets rid of bracketed comments and excess blanks }
  95.  
  96. Function  Compare(s1,s2 :string) : boolean; 
  97.                         {[STRING] Compares s1 to s2 - s2 can have wildcards }
  98.  
  99. Function  CompareL(s1,s2 :string; len : integer) : boolean; 
  100.                         {[STRING] Compares s1 to s2 for length len }
  101.  
  102. Function  CompareUpL(s1,s2 :string; len : integer) : boolean; 
  103.                         {[STRING] Compares s1 to s2 for length len (s1,s2 shifted UP)}
  104.  
  105. Function  CompressStr(s1 : string) : string; 
  106.                         {[STRING] simple minded compression}
  107.  
  108. Function  ConstStr(C : Char; N : Integer) : string; 
  109.                         {[STRING] Construct string of chars }
  110.  
  111. Function  CopyRemove(var s : string; f,l : integer) : string;
  112.                         {[STRING] copies then deletes a substring }
  113.  
  114. Function  CurrDTimeString : string; 
  115.                         {[DATETIME] current as mm/dd/yy hh:mm:ss}
  116.  
  117. Function  DateToJulian(Date : DateRec) : REAL; 
  118.                         {[DATETIME] YMD DateRec -> real }
  119.  
  120. Function  DaysBetweenDBaseDates(dt1,dt2 : string) : integer; 
  121.                         {[DATETIME] difference in days between DBase dates}
  122.  
  123. Function  DaysBetweenPTimes(PT1, PT2 : PTime) : longint; 
  124.                         {[DATETIME] difference in days between PTs}
  125.  
  126. Function  DaysInMonth(month, year : integer) : byte; 
  127.                         {[DATETIME] How many days in given month. }
  128.  
  129. Function  DBaseToPTime(s : string) : PTIME; 
  130.                         {[DATETIME] 'yyyymmdd' -> PT (longint) }
  131.  
  132. Function  DefaultDriveStr : string; 
  133.                         {[FILE] returns current drive}
  134.  
  135. Function  DeleteBackSlash(s1 : string) : string; 
  136.                         {[FILE] gets rid of '\'}
  137.  
  138. Function  DeQuoteString(s : string) : string; 
  139.                         {[STRING] Removes end quoted - see also QT and UnQT}
  140.  
  141. Procedure DeTokenizeStrings(var s,hold : string); 
  142.                         {[STRING] Puts back the strings}
  143.  
  144. Function  DirTag(path : string) : string; 
  145.                         {[FILE] the 8 char name for the DIR.}
  146.  
  147. Function  DnCaseStr(s : string) : string; 
  148.                         {[STRING] makes STRING -> string }
  149.  
  150. Function  DollarStr( R : real; L : integer ) : string; 
  151.                         {[STRING] formats $ values}
  152.  
  153. Function  DOSErrStr(err : integer) : string; 
  154.                         {[FILE] returns some text about err}
  155.  
  156. Procedure DumpRecBufInHex(recnum : longint; recsiz : integer; var rec); 
  157.                         {[DEBUG] Dumps a record buffer in HEX }
  158.  
  159. Function  EquivalentFile(fn1,fn2 : string) : boolean; 
  160.                         {[FILE] same eof/time diff name}
  161.  
  162. Procedure EraseFile(s : string); 
  163.                         {[FILE] no return, just does it if possible}
  164.  
  165. Function  ExtractDelimitedStr(var s : string; lchar,rchar : char) : string; 
  166.                         {[STRING] extracts a delimited substring }
  167.  
  168. Function  ExtractPath(var fname : string) : string; 
  169.                         {[FILE] returns all but name & ext}
  170.  
  171. Function  FileDate(fname : string; ext : string) : longint; 
  172.                         {[FILE] returns last mod date}
  173.  
  174. Function  FileExists(FName : String) : boolean; 
  175.                         {[FILE] returns true if file exists}
  176.  
  177. Function  FileExt(fname : string) : string; 
  178.                         {[FILE] returns just the file extenstion}
  179.  
  180. Function  FileInfo(filespec : string; ext : string;var SR : searchrec) : integer; 
  181.                         {[FILE] first file that matches}
  182.  
  183. Function  FileExtStr(fname : string) : string; 
  184.                         {[FILE] returns just the file extension (no path or name)}
  185.  
  186. Function  FilePathStr(fname : string) : string; 
  187.                         {[FILE] returns just the file directory (no name or ext)}
  188.  
  189. Function  FileRootStr(fname : string) : string; 
  190.                         {[FILE] returns just the file name root (no path or ext)}
  191.  
  192. Function  FindAndReplaceStr(str,fstr,rstr : string; both,all : boolean) : string; 
  193.                         {[STRING] finds fstr replaces with rstr, options}
  194.  
  195. Function  FmtAddress( a : longint; l : integer; flag : boolean) : string; 
  196.                         {[STRING] formats a longint optionally as hex - for DUMP }
  197.  
  198. Function  FmtCvtChr(b : byte) : string; 
  199.                         {[STRING] actual conversion, lowest level}
  200.  
  201. Function  FmtChr(b : byte) : string; 
  202.                         {[STRING] converts invisible chars to strings }
  203.  
  204. Function  FmtStr(s : string) : string; 
  205.                         {[STRING] DATACOM debugging tool, #27 -> <Esc> ...}
  206.  
  207. Function  FmtHMS(hr, mn, sc : word) : string; 
  208.                         {[DATETIME]  --> "hh:mm:ss"}
  209.  
  210. Function  FmtKstr(l : longint) : string; 
  211.                         {[STRING] nnnnnk for file bytes}
  212.  
  213. Function  FmtKstrComma(l : longint) : string; 
  214.                         {[STRING] nn,nnnk for file bytes}
  215.  
  216. Function  FmtPDateStr(PT : PTime) : string; 
  217.                            {[DATETIME] Returns 'mm/dd/yy' from PT }
  218.  
  219. Function  FmtPTimeStr(PT : PTime) : string; 
  220.                            {[DATETIME] Returns 'mm/dd/yy hh:mm:ss' from PT }
  221.  
  222. Function  FmtYMD(Yr, Mo, Da : word) : string; 
  223.                         {[DATETIME]  --> "mm/dd/yy"}
  224.  
  225. Procedure ForceExt(var fname : string; ext : string); 
  226.                         {[FILE] make sure .ext is what you want}
  227.  
  228. Function  ForceRenameToBAK(fname : string) : boolean; 
  229.                         {[FILE] Erases .BAK file first. }
  230.  
  231. Procedure ForcePath(var fname : string; path : string); 
  232.                         {[FILE] substitutes path for whatever fname has.}
  233.  
  234. Function  ForceRenameFile(fname1,fname2 : string) : boolean; 
  235.                         {[FILE] Erases file 2 first. }
  236.  
  237. Function  FormatDTime : string; 
  238.                         {[DATETIME] current as mm/dd/yy hh:mm:ss}
  239.  
  240. Function  GETAlphaStr ( var s : string) : string; 
  241.                         {[STRING] a..z,A..Z - trims off leading non-alphas}
  242.  
  243. Function  GETAlphaNumericStr( var s : string) : string; 
  244.                         {[STRING] a..z,A..Z,0..9 - trims off leading non-A/Ns}
  245.  
  246. Function  GETBoolean (var s : string) : boolean; 
  247.                         {[STRING] Returns false on "NO" and "OFF", true otherwise}
  248.  
  249. Function  GetCurrPTime(var pt : PTime) : word; 
  250.                         {[DATETIME] Gets Current date/time as PT, func ret is D.O.W.}
  251.  
  252. Function  GETDelimitedStr ( var s : string; lchr,rchr : char) : string; 
  253.                         {[STRING] Removes string in paired brackets, l & r CAN be same}
  254.  
  255. Function  GETInteger (var s : string) : integer; 
  256.                         {[STRING] Deletes until numerics and returns number}
  257.  
  258. Function  GETLeftStr ( var s : string; tch : char) : string; 
  259.                         {[STRING] Removes left string up to "tch" }
  260.  
  261. Function  GETLongInt (var s : string) : longint; 
  262.                         {[STRING] Deletes until numerics and returns number}
  263.  
  264. Function  GETNumericStr ( var s : string) : string; 
  265.                         {[STRING] 0..9+-. - trims off leading non-numerics}
  266.  
  267. Function  GETReal (var s : string) : real; 
  268.                         {[STRING] Deletes until numerics and returns number}
  269.  
  270. Function  GETRightStr ( var s : string; tch : char) : string; 
  271.                         {[STRING] Removes right string down to "tch" }
  272.  
  273. Function  GetString ( var s : string) : string; 
  274.                         {[STRING] gets sub-string to next comma}
  275.  
  276. Function  GetNumber( var astring : string) : real; 
  277.                         {[STRING] gets string to next comma, as number}
  278.  
  279. Function  HexToByte( st : string) : byte; 
  280.                         {[STRING] 1 byte conversion from hex}
  281.  
  282. Function  HexToLongInt(s : string) : longint; 
  283.                         {[STRING] xxxx to longint}
  284.  
  285. Function  HexAddressToLongInt(s : string) : longint; 
  286.                         {[STRING] xxxx:yyyy to longint}
  287.  
  288. Function  IntegerStr( I : integer; L : integer ) : string; 
  289.                         {[STRING] formats integer}
  290.  
  291. Function  Int2Real(i : Integer) : real; 
  292.                         {[MISC] ??}
  293.  
  294. Procedure JulianToDate(Julian : REAL; var Date : DateRec); 
  295.                         {[DATETIME] real -> YMD DateRec }
  296.  
  297. Function  JulianToPTime(J : Julian) : PTime; 
  298.                         {[DATETIME] real -> PT (longint) }
  299.  
  300.  
  301. Function  LeftStr( St : string; L : integer ) : string; 
  302.                         {[STRING] copies the left L chars }
  303.  
  304. Function  LJStr(s : string; w : byte) : string; 
  305.                         {[STRING] TUGstuf produces a left justified str length w}
  306.  
  307. Function  LongIntStr( I : longint; L : integer ) : string; 
  308.                         {[STRING] formats longint}
  309.  
  310. Function  LScan(str : string; tch : char) : byte; 
  311.                         {[STRING] Finds FIRST occurance of char TCH in string STR }
  312.  
  313. Function  MergeStr( s : string; posn : integer; s1 : string) : string; 
  314.                         {[STRING] Function version of ReplaceStr}
  315.  
  316. Function  Min(i1,i2 : integer) : integer; 
  317.                         {[MISC] chooses lesser of two ints}
  318.  
  319. Procedure MiscDelayNTicks(n : longint); 
  320.                         {[DATETIME] A delay of 1 seems to be about 0.05 seconds}
  321.  
  322. Function  MonthStr(mm : integer) : string; 
  323.                         {[DATETIME] 'Jan', 'Feb' ... }
  324.  
  325. Function  NibbleString(var s : string;tch : termchars; var termch : char) : string; 
  326.                         {[STRING] Fetches to one of a SET of chars - see also GetLeftStr }
  327.  
  328. Function  NumericsOnlyStr(s : string) : string; 
  329.                         {[STRING] gets rid of non-numerics}
  330.  
  331. Function  PackTimestr(PT : longint) : string; 
  332.                         {[DATETIME] PT as mm/dd/yy hh:mm:ss}
  333.  
  334. Procedure PatchStr(var s : string; ch1,ch2 : char); 
  335.                         {[STRING] replaces all ch1's with ch2's}
  336.  
  337. Function  PctStr(x,y : real; L,D : integer) : string; 
  338.                         {[STRING] formats as a percentage x/y}
  339.  
  340. Function  ProperName(s : string) : string; 
  341.                         {[STRING] makes STRING -> String }
  342.  
  343. Function  PTDayOfTheWeek( pt : PTime ) : word; 
  344.                         {[DATETIME] Returns D.O.W. from a PT }
  345.  
  346. Function  PTimePlusDays(PT : PTime; days : integer) : PTime; 
  347.                         {[DATETIME] Add days to a PT (longint) }
  348.  
  349. Function  PTimeToDBase(pt : PTime) : string; 
  350.                         {[DATETIME] PT (longint) -> 'yyyymmdd' }
  351.  
  352. Procedure PTimeToDMY(PT : PTime; var dd,mm,yy : integer); 
  353.                         {[DATETIME] PT (longint) -> dd,mm,yy}
  354.  
  355. Function  PTimeToJulian(PT : PTime) : real; 
  356.                         {[DATETIME] PT (longint) -> real }
  357.  
  358. Function  QT(s : string) : string; 
  359.                         {[STRING] makes a string with quotes around it }
  360.  
  361. Function  RealStr( R : real; L,D : integer ) : string; 
  362.                         {[STRING] formats real}
  363.  
  364. Function  RealZero( x : real) : boolean; 
  365.                         {[MISC] checks for nearly 0}
  366.  
  367. Function  Real2Int(x : real) : Integer; 
  368.                         {[MISC] ??}
  369.  
  370. Procedure RemoveBlanks(var astring : string); 
  371.                         {[STRING] removes ALL blanks }
  372.  
  373. Function  RemoveBracketComments(var s : string; lchar,rchar : char) : boolean; 
  374.                         {[STRING] A little smarter than RemoveDelimitedString}
  375.  
  376. Procedure RemoveDelimitedString ( var s : string; lchr,rchr : char); 
  377.                         {[STRING] Uses GetDelimitedStr and throws it away}
  378.  
  379. Procedure RemoveEOLComments(var s : string; cchar : char); 
  380.                         {[STRING] Clears comments designated by char to EOL (like !)}
  381.  
  382. Procedure RemoveExcessBlanks(var astring : string); 
  383.                         {[STRING] gets rid of double blanks}
  384.  
  385. Procedure RemoveEnds(var s : string); 
  386.                         {[STRING] - Removes first and last char from string}
  387.  
  388. Function  RemoveBrackets(s : string) : string; 
  389.                         {[STRING] - Removes various delimiters ONLY if on ends}
  390.  
  391. Procedure RemoveLeading(var s : string; ch : CHAR); 
  392.                         {[STRING] TUGstuf removes leading ch's}
  393.  
  394. Procedure RemoveTrailing(var s : string; ch : CHAR); 
  395.                         {[STRING] TUGstuf removes trailing ch's}
  396.  
  397. Function  RenameFile(fname1,fname2 : string) : boolean; 
  398.                         {[FILE] Returns false if fails. }
  399.  
  400. Procedure ReplaceStr( var Str : string; Offset : integer; S1 : string); 
  401.                         {[STRING] puts s1 into s }
  402.  
  403. Function  RightStr( St : string; L : integer ) : string; 
  404.                         {[STRING] copies the right L chars }
  405.  
  406. Function  ReplaceStringWithToken(var s,s1 : string; token : char) : boolean; 
  407.                         {[STRING] Pulls out quoted string, puts in a placeholder }
  408.  
  409. Function  RJStr(s : string; w : byte) : string; 
  410.                         {[STRING] TUGstuf produces a right justified str length w}
  411.  
  412. Function  Rpos(substr,str : string) : byte; 
  413.                         {[STRING] Equivalent to POS, but returns last occurance }
  414.  
  415. Function  RScan(str : string; tch : char) : byte; 
  416.                         {[STRING] Finds LAST occurance of char TCH in string STR }
  417.  
  418. Function  SameFile(fn1,fn2 : string) : boolean; 
  419.                         {[FILE] same file diff dir }
  420.  
  421. Procedure SetDateBytes(var yr,mo,dy : byte); 
  422.                         {[DATETIME] xBase support}
  423.  
  424. Procedure ShiftUPString(var s : string); 
  425.                         {[STRING] Procedure normally use function UpCaseStr }
  426.  
  427. Function  SizeofFile(fname : string; ext : string) : longint; 
  428.                         {[FILE] returns eof}
  429.  
  430. Function  StringToPTime(s : string) : PTIME; 
  431.                         {[DATETIME] flexible date input to PT }
  432.  
  433. Function  StrInt(s : string) : integer; 
  434.                         {[MISC] trims leading non-numerics}
  435.  
  436. Function  StrReal(s : string) : real; 
  437.                         {[MISC] trims leading non-numerics}
  438.  
  439. Function  StrLong(s : string) : longint; 
  440.                         {[MISC] trims leading non-numerics}
  441.  
  442. Function  StrBool (s : string) : boolean; 
  443.                         {[MISC] ??}
  444.  
  445. Procedure StrCal(ds : string; var dd,mm,yy : integer); 
  446.                         {[DATETIME] flexible date input " 3/1", "10/5/93" ...}
  447.  
  448. Procedure SuggestExt(var fname : string; ext : string); 
  449.                         {[FILE] only if EXT not specified}
  450.  
  451. Function  TicksSinceMidnight : longint; 
  452.                         {[DATETIME] number of 1/100 seconds}
  453.  
  454. Function  TicksToSecs ( t : longint ) : real; 
  455.                         {[DATETIME] a tick is 1/100 second}
  456.  
  457. Function  TicksToSecsStr ( t : longint ) : string; 
  458.                         {[DATETIME] a tick is 1/100 second  tk -> hh:mm:ss }
  459.  
  460. Procedure TokenizeStrings(var s,hold : string); 
  461.                         {[STRING] Pulls out quoted strings to hold - use before cleaning string}
  462.  
  463. Procedure Trim(var s : string); 
  464.                         {[STRING] Procedure - removes left and right blanks}
  465.  
  466. Function  TrimStr(s : string) : string; 
  467.                         {[STRING] Function - removes left and right blanks}
  468.  
  469. Function  UnCompressStr(s : string) : string; 
  470.                         {[STRING] simple minded de-compression}
  471.  
  472. Function  UnQT(s : string) : string; 
  473.                         {[STRING] removes quotes from around a string }
  474.  
  475. Function  UpCaseStr(s : STRING) : string; 
  476.                         {[STRING] TUGstuf produces String shifted UP}
  477.  
  478. Function  VolumeLabel( drive : string) : string; 
  479.                         {[FILE] returns vol label (up to 8 chars)}
  480.  
  481.  
  482.  
  483. Function  MyOpenFileExisting(var fvar : file; fname : string;
  484.                 recsize, fmode : integer; var error : integer) : boolean; 
  485.                     {[FILE] standardized call}
  486.  
  487. Function  MyOpenFileCreate(var fvar : file; fname : string;
  488.                 recsize : integer; var error : integer) : boolean; 
  489.                     {[FILE] standardized call}
  490.  
  491. Function  MyBlockRead(var fvar : file; var buf; count : integer;
  492.                 var numread, error : integer) : boolean; 
  493.                     {[FILE] standardized call}
  494.  
  495. Function  MyBlockWrite(var fvar : file; var buf; count : integer;
  496.                 var numwritten,error : integer) : boolean; 
  497.                     {[FILE] standardized call}
  498.  
  499. Function  MyCloseFile(var fvar : file; var error : integer) : boolean; 
  500.                     {[FILE] standardized call}
  501.  
  502. Function  MySeek(var fvar : file; n : longint; var error : integer) : boolean; 
  503.                     {[FILE] standardized call}
  504.  
  505. Function  TextSeek(var f:text; n:longint) : boolean; 
  506.                     {[FILE] The equivelant of seek - goes to location}
  507.  
  508. Function  TextPos(var f:text):longint; 
  509.                     {[FILE] The equivelant of filepos - returns location}
  510.  
  511. Function  FmtFileInfo(fname,ext : string) : string; 
  512.              {[FILE] gets info and formats it}
  513.  
  514. Function  FmtSearchRec(SR : SearchRec) : string; 
  515.              {[FILE] Return like DIR listing }
  516.  
  517. Function  FmtSearchRecK(SR : SearchRec) : string; 
  518.              {[FILE] Return like DIR listing - kbytes }
  519.  
  520. Function  FullFmtFileInfo(fname,ext : string; p : pathstr) : string; 
  521.              {[FILE] gets info and formats it(FULL PATH)}
  522.  
  523. Function  FullFmtSearchRec(SR : SearchRec; p : pathstr) : string; 
  524.              {[FILE] Return like DIR listing, but FULL filename }
  525.  
  526. Function  FullFmtSearchRecK(SR : SearchRec; p : pathstr) : string; 
  527.              {[FILE] Return like DIR listing, but FULL filename - kBytes}
  528.  
  529. Procedure SearchEngine(Mask : PathStr; Attr : Byte; Proc : FSCAN_ProcType;
  530.                             VAR ErrorCode : Byte); 
  531.              {[FILE] Engine for scanning file info from one directory }
  532.  
  533. Procedure SearchEngineAll(path  : PathStr; Mask : FSCAN_FullNameStr;
  534.                       Attr : Byte; Proc : FSCAN_ProcType; VAR ErrorCode : Byte); 
  535.              {[FILE] Engine for scanning file info from ALL directories }
  536.  
  537. Function  SEGoodDirectory(S : SearchRec) : Boolean;
  538.              {[FILE] internal for FILE SearchEngine }
  539.  
  540. Procedure SEErrorMessage(ErrCode  : Byte);
  541.              {[FILE] internal for FILE SearchEngine }
  542.  
  543. Procedure SESearchOneDir(VAR S : SearchRec; P : PathStr);
  544.              {[FILE] Recursive Procedure to search one directory}
  545.  
  546. Function  ExecuteCommand(cmd : string) : integer; 
  547.              {[EXEC] run DOS commands from program }
  548.  
  549. Function  TPC(fname,options : string; var err : integer) : boolean;
  550.              {[EXEC] - Invokes the compiler directly, finds a few errors}
  551.  
  552. IMPLEMENTATION
  553.  
  554.  
  555. { reference info - record structures from DOS unit
  556. types: type DateTime  =  record         ( from DOS unit )
  557.              year, month, day, hour, min, sec : word;
  558.              end;}
  559.  
  560.  
  561. {$I MISCCORE.INC }   { old MiscStuf }
  562.  
  563. {$I MISCPTIM.INC }   { old PTimStuf }
  564.  
  565. {$I MISCPARS.INC }   { old ParsStuf }
  566.  
  567. {$I MISCMYFI.INC }   { old MYFile }
  568.  
  569. {$I MISCOTHR.INC }   { VARIOUS }
  570.  
  571. {section  _Initialization}
  572.      begin {initialization}
  573.      ScanStufInit;
  574.      end.
  575.